package com.ruitu.mall_98_1.mvp.contract;

import com.beanu.arad.base.BaseModel;
import com.beanu.arad.base.BasePresenter;
import com.beanu.arad.base.BaseView;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.app.HomeData;
import com.ruitu.router_module.bean.app.RongToken;

import rx.Observable;


public interface MainHomeContract {
    public interface View extends BaseView {
        //type 1 首页数据 2 融云连接成功 3 未读消息
        public void onReqComplete(boolean isSuc, int type, Object data);
    }

    public abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void reqAppHome(String cityName, String accountId);

        public abstract void connectRong(String appKey, String nonce, String timeStamp
                , String signiture, String userId, String userName, String portraitUri);

        public abstract void reqUnReadNum(String accountId);
    }

    public interface Model extends BaseModel {
        Observable<BaseResult<HomeData>> reqAppHome(String cityName, String accountId);

        Observable<RongToken> reqRongToken(String appKey, String nonce, String timeStamp
                , String signiture, String userId, String userName, String portraitUri);

        Observable<BaseResult<Integer>> reqUnReadNum(String accountId);
    }
}